import java.util.*;

/**
 * @Author 12629
 * @Description：
 */
class Person {
    public String name;
    public int age;


    @Override
    public String toString() {
        System.out.println("fdsfsafafafafsafsafsa");
        return "gaobo";
    }
}
public class Test {

    public static void main(String[] args) {

        Person person = new Person();
        System.out.println(person);
    }

    /* public int aMethod(){
        static int i = 0;
        i++;
        return i;
    }
    public static void main(String[] args){
        Test test = new Test();
        test.aMethod();
        int j = test.aMethod();
        System.out.println(j);
    }


   String s;

    public static int add(int a,int b) {
        return a+b;
    }

    public static int add(int a,int b,int c) {
        return a+b+c;
    }*/

    /*public static int add(int[] array) {
        int ret = 0;
        for (int x: array) {
            ret += x;
        }
        return ret;
    }*/

    /**
     * 可变参数
     * @param array
     * @return
     */
    public static int add(int... array) {
        int ret = 0;
        for (int x: array) {
            ret += x;
        }
        return ret;
    }



    public static void main1(String[] args) {
        int[] array = {1,2,3,4,5};
        System.out.println(add(array));
        System.out.println(add(new int[]{1, 3, 4, 5, 6}));




        /*Test test = new Test();
        System.out.println("s="+test.s);*/
        //System.out.println(new Test().s);
    }
}
